<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="../style/cssqt.css" rel="stylesheet" type="text/css" />
</head>

<body>
<?php
include("../config/config.php");
$lenh = "select Makhachhang,Tenkhachhang,Phai,Diachi,Dienthoai,user,Matkhau,Macv,email,ngaysinh from khachhang";
$kq = mysql_query($lenh);

$kq = mysql_query($lenh);
$sodong = 10;
$sodulieu = mysql_num_rows($kq);
$sotrang = ceil($sodulieu/$sodong);
if(!$_GET["p"])
$p =1;
else
$p = $_GET["p"];
$x = ($p-1)*$sodong;

$lenh1 = "select Makhachhang,Tenkhachhang,Phai,Diachi,Dienthoai,user,Matkhau,Macv,email,ngaysinh from khachhang limit $x,$sodong";
$kq1=mysql_query($lenh1);
?>
<table width="1110" border="1" cellspacing="0" cellpadding="0" class="table_khachhang">
  <tr>
    <td height="30" colspan="10" align="center" class="title_table"><strong>Thông Tin Khách Hàng</strong></td>
  </tr>
  <tr>
    <td width="44" height="30" align="center"><strong>Makh</strong></td>
    <td width="155" height="30" align="center"><strong>Tên Khách Hàng</strong></td>
    <td width="48" height="30" align="center"><strong>Phái</strong></td>
    <td width="147" height="30" align="center"><strong>Địa chỉ</strong></td>
    <td width="91" height="30" align="center"><strong>Điện thoại</strong></td>
    <td width="73" height="30" align="center"><strong>User</strong></td>
    <td width="59" height="30" align="center"><strong>Mật khẩu</strong></td>
    <td width="46" height="30" align="center"><strong>Macv</strong></td>
    <td width="221" height="30" align="center"><strong>Email</strong></td>
    <td width="98" height="30" align="center"><strong>Ngày sinh</strong></td>
    
  </tr>
  <?php
   while($row = mysql_fetch_row($kq1))
  {
	   if($row[2]==1)
	  $phai = "Nam";
	  else
	  $phai = "Nữ";
	  ?>
  
  <tr>
    <td align="center"><?php echo $row[0]; ?></td>
    <td style="padding-left:5px;"><?php echo $row[1]; ?></td>
    <td style="padding-left:5px;"><?php echo $phai; ?></td>
    <td><?php echo $row[3]; ?></td>
    <td style="padding-left:5px;"><?php echo $row[4]; ?></td>
    <td align="center"><?php echo $row[5]; ?></td>
    <td style="padding-left:5px;"><?php echo $row[6]; ?></td>
    <td align="center"><?php echo $row[7]; ?></td>
    <td style="padding-left:5px;"><?php echo $row[8]; ?></td>
    <td align="center"><?php echo $row[9]; ?></td>
    
  </tr>
  <?php
  }
  ?>
</table>
<p align="center">
<?php
for($i = 1; $i <= $sotrang; $i++)
{
	if($p==$i)
	{
		echo "&nbsp;".$i."&nbsp;";
	}
	else
	{
		?>
    <a href="indexqt.php?act=qlkh&p=<?php  echo $i;   ?>"><?php  echo $i;  ?></a>
    
    
    <?php
	}		
}
?>
</p>
<p align="center">
<font color="#FF0000">Số đặt hàng hiện tại là :</font> <?php  echo $sodulieu;     ?>
</p>
</body>
</html>